#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "dialog.h"
#include <QDialog>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


//void MainWindow::on_pushButton_clicked()
//{
//    QDialog* dialog=new QDialog(this);
//    dialog->resize(400,250);
//    dialog->setAttribute(Qt::WA_DeleteOnClose);
//    dialog->show();
//}

void MainWindow::on_pushButton_clicked()
{
    Dialog* dia=new Dialog(this);
    dia->resize(400,130);
    dia->setAttribute(Qt::WA_DeleteOnClose);
    dia->show();
//    dia->exec();
}
